package com.mrroman.linksender.gui;

import javax.swing.JCheckBoxMenuItem;
import javax.swing.JPopupMenu;

import com.mrroman.linksender.gui.actions.ExitAction;
import com.mrroman.linksender.gui.actions.HideAllMessageEventsAction;
import com.mrroman.linksender.gui.actions.HideGroupMessagesAction;
import com.mrroman.linksender.gui.actions.SendClipboardAction;
import com.mrroman.linksender.gui.actions.SendMessageDialogAction;
import com.mrroman.linksender.gui.actions.ShareDirAction;
import com.mrroman.linksender.gui.actions.ShareFileAction;
import com.mrroman.linksender.gui.actions.ShowChatDialogAction;
import com.mrroman.linksender.gui.actions.ShowConfigurationAction;
import com.mrroman.linksender.gui.actions.ShowHistoryAction;
import com.mrroman.linksender.ioc.In;
import com.mrroman.linksender.ioc.Init;
import com.mrroman.linksender.ioc.Name;

@Name("gui.TrayPopupMenu")
public class TrayPopupMenu extends JPopupMenu {

    @In
    private SendClipboardAction sendClipboardAction;
    @In
    private ExitAction exitAction;
    @In
    private ShowHistoryAction showHistoryAction;
    @In
    private HideAllMessageEventsAction hideAllMessageEventsAction;
    @In
    private ShowConfigurationAction showConfigurationAction;
    @In
    private SendMessageDialogAction sendMessageDialogAction;
    @In
    private HideGroupMessagesAction hideGroupMessagesAction;
    @In
    private ShareDirAction shareDirAction;
    @In
    private ShareFileAction shareFileAction;
    @In
    private ShowChatDialogAction showChatDialogAction;

    @Init
    public void initPopupMenu() {
        add(sendClipboardAction);
        add(sendMessageDialogAction);
        add(showChatDialogAction);
        addSeparator();
        add(shareDirAction);
        add(shareFileAction);
        addSeparator();
        add(hideAllMessageEventsAction);
        //add(showHistoryAction);
        addSeparator();
        add(showConfigurationAction);
        add(new JCheckBoxMenuItem(hideGroupMessagesAction));
        addSeparator();
        add(exitAction);
    }
}
